<?php
/**
 * Description of payment
 * 
 * @author trangnguyen
 * @since Dec 30, 2013 - 4:26:30 PM
 */
/**
 * End of payment
 */
?>
<!--Trang - Thanh toán sản phẩm-->
<?php $this->pageTitle = Option::getItem('payment') . ' - ' . Option::getItem('site_name'); ?>
<div class="contact-wrap">
    <div id="wapper-user" class="fl">
        <div class="name-title">
            Thông tin tài khoản
        </div>
        <div class="wrap-form" >   
            <?php
            $form = $this->beginWidget('CActiveForm', array(
                'id' => 'Order-Form',
                'focus' => array($model, 'name'),
                'enableClientValidation' => true,
            ));
            ?>
            <div class="list-input error">
                <?php echo $form->labelEx($model, 'customer_name', array('class' => 'title-contact error')); ?>
                <?php echo $form->textField($model, 'customer_name', array('class' => 'input-contact error', 'placeholder' => 'Họ và tên')); ?>
                <div class="clear"></div>
                <font color="red">
                <?php echo $form->error($model, 'customer_name', array('id' => 'contacterror', 'class' => 'contacterror')); ?>
                </font>
            </div>
            <div class="list-input">
                <?php echo $form->labelEx($model, 'customer_email', array('class' => 'title-contact error')); ?>
                <?php echo $form->textField($model, 'customer_email', array('class' => 'input-contact error', 'placeholder' => 'Họ và tên')); ?>
                <div class="clear"></div>
                <font color="red">
                <?php echo $form->error($model, 'customer_email', array( 'class' => 'contacterror')); ?>
                </font>
            </div>
            <div class="list-input">
                <?php echo $form->labelEx($model, 'customer_phone', array('class' => 'title-contact error')); ?>
                <?php echo $form->textField($model, 'customer_phone', array('class' => 'input-contact error', 'placeholder' => 'Họ và tên')); ?>
                
                <div class="clear"></div>
            </div>
            <div class="list-input">
                <?php echo $form->labelEx($model, 'customer_address', array('class' => 'title-contact error')); ?>
                <?php echo $form->textField($model, 'customer_address', array('class' => 'input-contact error', 'placeholder' => 'Họ và tên')); ?>
              
                <div class="clear"></div>
            </div>
            <div class="list-input">

                <?php echo $form->labelEx($model, 'note', array('class' => 'error')); ?>
                <?php echo $form->textarea($model, 'note', array('class' => 'tarea-contact error', 'placeholder' => 'Họ và tên')); ?>

            </div>
            <div class="list-input" id="cappcha">
                <?php echo $form->labelEx($model, 'verifyCode', array('class' => 'gwt-RealLabe')); ?>
                <?php
                $this->widget('CCaptcha');
                ?>

            </div>
            <div class="list-input" id="cappcha">
                <label class="gwt-RealLabel">&ApplyFunction;</label>
                <?php echo $form->textField($model, 'verifyCode', array('class' => 'input-contact', 'placeholder' => 'Nhập mã xác nhận')); ?>
                <font color="red"><?php echo $form->error($model, 'verifyCode', array('class' => 'contacterror',)); ?></font>
            </div>
            <div class="btn-order" id="sub-contact">
                <button type="submit">
                Đặt hàng
                <img src="<?php echo $this->assetDir . 'img/icon/thanhtoan.png'  ?>">
                </button>
            </div>
            <div class="clear"></div>
            <?php $this->endWidget(); ?>
        </div>
    </div>
    <div id="wapper-order" class="fl">
        <div class="name-title">
            Thông tin giỏ hàng
        </div>
        <table style="border-collapse: collapse" class="tbl-order">
            <?php
            if ($cartItems):
                foreach ($cartItems as $item):
                    ?>
                    <tr>
                        <td>
                            <img src="<?php echo $item->product->getPublicResize(110,106) ?>">
                        </td>
                        <td class="order-padding">
                            <div class="order-title">
                                <a href="<?php echo $item->product->publicUrl ?>">
                                <?php echo $item->product->name ?>
                                </a>
                            </div>
                            <div class="order-desc">
                                <?php echo $item->product->priceFormat ?>
                                <br>
                                Số lượng: <?php echo $item->qty ?>
                            </div>
                        </td>
                    </tr>
                <?php endforeach; ?>
            <?php endif; ?>
        </table>
    </div>
</div>

